### 
# @Company: TWL
 # @Author: xue jian
 # @Email: xuejian@kanzhun.com
 # @Date: 2019-09-10 22:17:23
###

# offline
# ips=("172.21.39.1" "172.21.39.2" "172.21.39.3" "172.21.39.4" "172.21.39.5"\ 
#  "172.21.39.6" "172.21.39.8" "172.21.39.10" "172.21.39.12" "172.21.39.14" )

# # realtime
# ips=("172.21.34.88" "172.21.34.44" "172.21.34.178" "172.21.34.20" "172.21.34.40"\ 
#  "172.21.34.60" "172.21.34.115" "172.21.34.24" "172.21.34.73" "172.21.34.143")

# # online
# ips=("172.21.34.192" "172.21.34.159" "172.21.34.126" "172.21.34.82" "172.21.34.199"\
#  "172.21.34.98" "172.21.34.59" "172.21.34.180" "172.21.34.166" "172.21.34.105") #the online ps

ips=("172.21.39.1" "172.21.39.2" "172.21.39.3" "172.21.39.4")
# ips=("172.21.34.88" "172.21.34.44" "172.21.34.178" "172.21.34.20")
# ips=("172.21.34.192" "172.21.34.159" "172.21.34.126" "172.21.34.82" )

# for ip in ${ips[*]}
# do
#     echo $ip
#     ssh -p 13122 $ip 'mkdir -p /data/model_ps;
#     rm -rf /data/model_ps/*;
#     mkdir -p /data/rocksdb;
#     exit'
#     scp -P 13122 -r worker $ip:/data/model_ps/
#     scp -P 13122 __init__.py $ip:/data/model_ps
#     scp -P 13122 psm_conf.py $ip:/data/model_ps
# done


ips_controller=("172.21.39.1")

echo $ips_controller
ssh -p 13122 $ips_controller 'mkdir -p /data/model_ps;
rm -rf /data/model_ps/controller;
exit'
scp -P 13122 -r controller $ips_controller:/data/model_ps/


